package com.zw.hrm.feignclients;

import com.zw.hrm.doc.CourseDoc;
import com.zw.hrm.fallback.ESFeignClientFallbackFactory;
import com.zw.hrm.query.CourseQuery;
import com.zw.hrm.util.AjaxResult;
import com.zw.hrm.util.PageList;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "es-server", fallbackFactory = ESFeignClientFallbackFactory.class)
public interface ESFeignClient {
    @PostMapping("/es/save")
    public AjaxResult save(@RequestBody CourseDoc courseDoc);
    @DeleteMapping("/es/deleteById/{id}")
    public AjaxResult deleteById(@PathVariable("id") Long id);
    @PostMapping("/es/searchCourse")
    public PageList<CourseDoc> searchCourse(@RequestBody CourseQuery courseQuery);
}
